var url;
onmessage = function(event) {
	url = event.data;
	heartbeatSender();
}

function heartbeatSender() {
	var xmlHttp;
	try {
		xmlHttp = new XMLHttpRequest(); // 实例化对象
	} catch (e) {
		try {
			xmlHttp = new ActiveXObject("Msxml2.XMLHTTP");
		} catch (e) {
			try {
				xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
			} catch (e) {
				alert("您的浏览器不支持AJAX！");
				return false;
			}
		}
	}

	xmlHttp.onreadystatechange = function() {
		if (xmlHttp.readyState == 4 && xmlHttp.status == 200) {
			postMessage(xmlHttp.responseText);
		}
	};
	xmlHttp.open("GET", url + "?" + Math.random(), false);
	xmlHttp.send(null);
	setTimeout("heartbeatSender()", 60000);
}